<?php
header("Content-type: text/html; charset=utf-8");
include "./SDK/TopSdk.php";

//将下载SDK解压后top里的TopClient.php第8行$gatewayUrl的值改为沙箱地址:http://gw.api.tbsandbox.com/router/rest,
//正式环境时需要将该地址设置为:http://gw.api.taobao.com/router/rest

//实例化TopClient类
$c = new TopClient;
$c->appkey = "21222736";
$c->secretKey = "9354ca007c198f6be7c2f445ede14d5b";

//实例化具体API对应的Request类
$req = new ItemGetRequest;
$req->setFields("item_img,price");
$req->setNumIid("16107134943");

//执行API请求并打印结果
$resp = $c->execute($req);
print_r(json_encode($resp));
?>